Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

327
Visualizações
Uncaught DOMException: Blocked a frame with origin "http://subdomain.lvh.me:3000" from accessing a cross-origin frame (http://lvh.me:3000)

Well, I'm trying to run an iframe or window.open in my subdomain page to access the domain page for Google Login permission purposes. But i'm getting the cross origin error.

My principal page is: http://subdomain.lvh.me:3000

And when I click on the button, a new pages open or the iframe opens (does not make difference) with the URL: http://lvh.me:3000

But in this way I can't access iframe.contentWindow.document to get the iframe content value from the principal page. That is the situation: Image error

And, when I try to send by window.postMessage, this is the error: postMessage error

Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('http://subdomin.lvh.me:3001') does not match the recipient window's origin ('http://lvh.me:3001').

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You need to set the targetOrigin field when using postMessage to another domain

postMessage(‘hello world’, ’http://lvh.me:3000/’)
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda